#ifndef _BASIS_DYNARRAY_H_
#define _BASIS_DYNARRAY_H_

//	a DynArray stores data in an ordered random access structure with
//	no delete operations. Items are added with append

template <class T> class DynArray
{
public:
	DynArray();
	DynArray(int a);
	~DynArray();

	bool append(T item);	//	add from end
	bool truncate();		//	make arraySize = nData
	void clear();
	int length() const;
	bool empty() const;

	const T &operator[](int index) const;
	T &operator[](int index);

	T *data;
	int nData;
	int arraySize;
};


#endif